package com.gzg.userservice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gzg.userservice.domain.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from users limit #{start},#{pageSize}")
    List<User> queryAllUsers(int start, int pageSize);


    List<User> queryUsersByIds(List<Long> ids, int start, int pageSize);

    @Select("select count(*) from users")
    int queryAllUsersCount();


    boolean updateBUseryId(User user);
}
